package com.deYang.app.ljodfh.ui.activities;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.deYang.app.ljodfh.R;
import com.deYang.app.ljodfh.base.BaseActivity;
import com.deYang.app.ljodfh.ui.utils.TitleUtils;

import butterknife.BindView;
import butterknife.ButterKnife;


public class AboutActivity extends BaseActivity {
    @BindView(R.id.about_current_version)
    protected CustomFontTextView current_version;
    private String versioncode;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        new TitleUtils(this).setBackVisible(true).setLogo(false);
        PackageManager pm = getPackageManager();
        PackageInfo pi = null;
        try {
            pi = pm.getPackageInfo(getPackageName(), 0);
            versioncode = pi.versionName;
            current_version.setText(getString(R.string.about_current_version)+" V" + versioncode);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }


    }

    @Override
    protected void initInject() {
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);
    }
}
